﻿using System;
using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;

using Model.DataManagement;

namespace LibraryManagerTests.Model.DataManagement
{
    [TestClass]
    public class MessagesTests
    {

        /// <summary>
        /// Tests if the internal data is unreachable after construction and calling Messages.Messages.
        /// </summary>
        [TestMethod]
        public void TestAccess()
        {
            string s1 = "s1";
            string s2 = "s2";
            
            string[] strings = { s1, s2 };
            Messages m = new Messages(strings);
            IList<string> messages = m.MessageList;

            Assert.AreNotSame(strings, m.MessageList);
        }
    }
}
